-- @owner: z@wan005
-- @date: 2022/01/06
-- @testpoint: datetime类型作为对象名称测试，部分测试点合理报错
@connect PrimaryDbBmode;
--step1:查询datetime是哪种类型的关键字;expect:非保留关键字
select * from pg_get_keywords() where word ='datetime';
--step2:作为列名和字段的数据类型;expect:成功
drop table if exists t_datetime0021 cascade;
create table t_datetime0021(datetime datetime);
--step3:作为索引名;expect:成功
create index datetime on t_datetime0021(datetime);
drop table if exists t_datetime0021 cascade;
--step4:作为数据库名;expect:成功
drop database if exists datetime;
create database datetime;
drop database datetime;
--step5:作为外部数据源名;expect:成功
drop data source if exists datetime;
create data source datetime;
drop data source datetime;
--step6:作为自定义函数名;expect:合理报错
create function datetime(i integer)
returns integer
as $$
begin
    return i+1;
end;
$$ language plpgsql;
/
--step7:作为角色名;expect:成功
drop role if exists datetime;
create role datetime with password 'gauss@123' valid until '2020-12-31';
drop role datetime;
--step8:作为用户组名;expect:成功
drop group if exists datetime;
create group datetime with password 'gauss@123';
drop group datetime;
--step9:作为模式名;expect:成功
drop schema if exists datetime;
create schema datetime;
drop schema datetime;